|
Jasmine is an open source testing framework for JavaScript.〔http://jasmine.github.io/〕 It aims to run on any JavaScript-enabled platform, to not intrude on the application nor the IDE, and to have easy-to-read syntax. It is heavily influenced by other unit testing frameworks, such as ScrewUnit, JSSpec, JSpec, and RSpec.〔https://github.com/pivotal/jasmine/wiki/Background〕 == Usage == Jasmine aims to be easy to read. A simple hello world test looks like the code below, where describe() describes a suite of tests and it() is an individual test specification. The name "it()" follows the idea of behavior-driven development and serves as the first word in the test name, which should be a complete sentence. Usage follows syntax similar to that of RSpec. The code below tests a function named helloWorld()and verifies that its output is the text "Hello world!". describe('Hello world', function() ); Jasmine has a number of other features, such as custom matchers, spies, and support for asynchronous specifications. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Jasmine (JavaScript framework)」の詳細全文を読む スポンサード リンク
|